package cn.wolfcode.education.mapper;

import cn.wolfcode.education.domain.Employee;
import cn.wolfcode.education.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    int updateByPrimaryKey(Employee record);

    List queryForList(QueryObject qo);

    Integer queryForCount(QueryObject qo);

    void updateStateById(@Param("id") Long id, @Param("state") int state);

    void insertRelationWithRole(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    void deleteRelationWithRole(Long id);

    Employee getByUsername(String username);

    List<Employee> queryAll();

    List<Employee> selectTeacherByRoleIdWithSchedle(Long roleId);

    /**
     * 该方法用来验真用户
     *
     * @param username
     * @return
     */

    Employee retrieveSelectEmployee(String username);

    void updatePassword(@Param("enPass") String enPass, @Param("username") String username);

    List<Employee> selectEmployeeByDeptId(List<Long> deptIds);

    List<Employee> selectAllManager();

    List<Employee> allSellEmp();

    List<Employee> queryEmpName(Long id);
}